home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-SPAR.{_6 / PCIC.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  5KB  |  107 lines

  1. /* $Id: pcic.h,v 1.1 1998/09/22 05:54:39 jj Exp $
  2.  * pcic.h: JavaEngine 1 specific PCI definitions.
  3.  *
  4.  * Copyright (C) 1998 V. Roganov and G. Raiko
  5.  */
  6.  
  7. #ifndef __SPARC_PCIC_H
  8. #define __SPARC_PCIC_H
  9.  
  10. #include <linux/types.h>
  11. #include <linux/smp.h>
  12. #include <linux/smp_lock.h>
  13. #include <linux/pci.h>
  14. #include <asm/pbm.h>
  15.  
  16. struct linux_pcic {
  17.         unsigned long           pcic_regs;
  18.         unsigned long           pcic_io;
  19.         unsigned long           pcic_io_phys;
  20.         unsigned long           pcic_mapped_io;
  21.         unsigned long           pcic_config_space_addr;
  22.         unsigned long           pcic_config_space_data;
  23.         struct linux_pbm_info   pbm;
  24. };
  25.  
  26. extern unsigned long pcic_alloc_io(unsigned long* addr);
  27. extern void pcic_probe(void);
  28. extern void sun4m_pci_init_IRQ(void);
  29.  
  30. /* Size of PCI Space */
  31. #define PCI_SPACE_SIZE                  0x1000000       /* 16 MB */
  32.  
  33. /* PCIC Register Set. */
  34. #define PCI_DIAGNOSTIC_0                0x40    /* 32 bits */
  35. #define PCI_SIZE_0                      0x44    /* 32 bits */
  36. #define PCI_SIZE_1                      0x48    /* 32 bits */
  37. #define PCI_SIZE_2                      0x4c    /* 32 bits */
  38. #define PCI_SIZE_3                      0x50    /* 32 bits */
  39. #define PCI_SIZE_4                      0x54    /* 32 bits */
  40. #define PCI_SIZE_5                      0x58    /* 32 bits */
  41. #define PCI_PIO_CONTROL                 0x60    /* 8  bits */
  42. #define PCI_DVMA_CONTROL                0x62    /* 8  bits */
  43. #define  PCI_DVMA_CONTROL_INACTIVITY_REQ        (1<<0)
  44. #define  PCI_DVMA_CONTROL_IOTLB_ENABLE          (1<<0)
  45. #define  PCI_DVMA_CONTROL_IOTLB_DISABLE         0
  46. #define  PCI_DVMA_CONTROL_INACTIVITY_ACK        (1<<4)
  47. #define PCI_INTERRUPT_CONTROL           0x63    /* 8  bits */
  48. #define PCI_CPU_INTERRUPT_PENDING       0x64    /* 32 bits */
  49. #define PCI_DIAGNOSTIC_1                0x68    /* 16 bits */
  50. #define PCI_SOFTWARE_INT_CLEAR          0x6a    /* 16 bits */
  51. #define PCI_SOFTWARE_INT_SET            0x6e    /* 16 bits */
  52. #define PCI_SYS_INT_PENDING             0x70    /* 32 bits */
  53. #define PCI_SYS_INT_TARGET_MASK         0x74    /* 32 bits */
  54. #define PCI_SYS_INT_TARGET_MASK_CLEAR   0x78    /* 32 bits */
  55. #define PCI_SYS_INT_TARGET_MASK_SET     0x7c    /* 32 bits */
  56. #define PCI_SYS_INT_PENDING_CLEAR       0x83    /* 8  bits */
  57. #define PCI_IOTLB_CONTROL               0x84    /* 8  bits */
  58. #define PCI_INT_SELECT_LO               0x88    /* 16 bits */
  59. #define PCI_ARBITRATION_SELECT          0x8a    /* 16 bits */
  60. #define PCI_INT_SELECT_HI               0x8c    /* 16 bits */
  61. #define PCI_HW_INT_OUTPUT               0x8e    /* 16 bits */
  62. #define PCI_IOTLB_RAM_INPUT             0x90    /* 32 bits */
  63. #define PCI_IOTLB_CAM_INPUT             0x94    /* 32 bits */
  64. #define PCI_IOTLB_RAM_OUTPUT            0x98    /* 32 bits */
  65. #define PCI_IOTLB_CAM_OUTPUT            0x9c    /* 32 bits */
  66. #define PCI_SMBAR0                      0xa0    /* 8  bits */
  67. #define PCI_MSIZE0                      0xa1    /* 8  bits */
  68. #define PCI_PMBAR0                      0xa2    /* 8  bits */
  69. #define PCI_SMBAR1                      0xa4    /* 8  bits */
  70. #define PCI_MSIZE1                      0xa5    /* 8  bits */
  71. #define PCI_PMBAR1                      0xa6    /* 8  bits */
  72. #define PCI_SIBAR                       0xa8    /* 8  bits */
  73. #define   PCI_SIBAR_ADDRESS_MASK        0xf
  74. #define PCI_ISIZE                       0xa9    /* 8  bits */
  75. #define   PCI_ISIZE_16M                 0xf
  76. #define   PCI_ISIZE_32M                 0xe
  77. #define   PCI_ISIZE_64M                 0xc
  78. #define   PCI_ISIZE_128M                0x8
  79. #define   PCI_ISIZE_256M                0x0
  80. #define PCI_PIBAR                       0xaa    /* 8  bits */
  81. #define PCI_CPU_COUNTER_LIMIT_HI        0xac    /* 32 bits */
  82. #define PCI_CPU_COUNTER_LIMIT_LO        0xb0    /* 32 bits */
  83. #define PCI_CPU_COUNTER_LIMIT           0xb4    /* 32 bits */
  84. #define PCI_SYS_LIMIT                   0xb8    /* 32 bits */
  85. #define PCI_SYS_COUNTER                 0xbc    /* 32 bits */
  86. #define   PCI_SYS_COUNTER_OVERFLOW      (1<<31) /* Limit reached */
  87. #define PCI_SYS_LIMIT_PSEUDO            0xc0    /* 32 bits */
  88. #define PCI_USER_TIMER_CONTROL          0xc4    /* 8  bits */
  89. #define PCI_USER_TIMER_CONFIG           0xc5    /* 8  bits */
  90. #define PCI_COUNTER_IRQ                 0xc6    /* 8  bits */
  91. #define  PCI_COUNTER_IRQ_SET(sys_irq, cpu_irq)  ((((sys_irq) & 0xf) << 4) | \
  92.                                                   ((cpu_irq) & 0xf))
  93. #define  PCI_COUNTER_IRQ_SYS(v)                 (((v) >> 4) & 0xf)
  94. #define  PCI_COUNTER_IRQ_CPU(v)                 ((v) & 0xf)
  95. #define PCI_PIO_ERROR_COMMAND           0xc7    /* 8  bits */
  96. #define PCI_PIO_ERROR_ADDRESS           0xc8    /* 32 bits */
  97. #define PCI_IOTLB_ERROR_ADDRESS         0xcc    /* 32 bits */
  98. #define PCI_SYS_STATUS                  0xd0    /* 8  bits */
  99. #define   PCI_SYS_STATUS_RESET_ENABLE           (1<<0)
  100. #define   PCI_SYS_STATUS_RESET                  (1<<1)
  101. #define   PCI_SYS_STATUS_WATCHDOG_RESET         (1<<4)
  102. #define   PCI_SYS_STATUS_PCI_RESET              (1<<5)
  103. #define   PCI_SYS_STATUS_PCI_RESET_ENABLE       (1<<6)
  104. #define   PCI_SYS_STATUS_PCI_SATTELITE_MODE     (1<<7)
  105.  
  106. #endif /* !(__SPARC_PCIC_H) */
  107.